home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 1 / PC Actual CD 01.iso / share / dos / graficos / plydat14.arj / SOMBRERO.PI < prev    next >
Encoding:
Text File  |  1992-04-05  |  947 b   |  45 lines

  1. // Set up the camera
  2. viewpoint {
  3.    from <0,10,-6>
  4.    at <0,0,0>
  5.    up <0,1,0>
  6.    angle 45
  7.    resolution 160, 160
  8.    }
  9.  
  10. define white <1,1,1>
  11. define DarkSlateGray <0.184314, 0.309804, 0.309804>
  12. define red <1, 0, 0>
  13. define SkyBlue <0.196078, 0.6, 0.8>
  14.  
  15. // Set up background color & lights
  16. background SkyBlue
  17. light <10,10,-10>
  18.  
  19. define shiny_red
  20. texture {
  21.    surface {
  22.       ambient red, 0.2
  23.       diffuse red, 0.6
  24.       specular white, 0.8
  25.       microfacet Reitz 10
  26.       }
  27.    }
  28.  
  29. define sombbound object { box <-4, -2, -4>, <4, 2, 4> }
  30.  
  31. define three_sphere object { sphere <0,0,0>, 3 }
  32.  
  33. define a_const 1.0
  34. define b_const 2.0
  35. define c_const 3.0
  36. define two_pi_a 2.0 * 3.14159265358 * a_const
  37.  
  38. // Define a diminishing cosine surface (sombrero)
  39. object {
  40.    function y - c_const * cos(two_pi_a * sqrt(x^2 + z^2)) *
  41.                           exp(-b_const * sqrt(x^2 + z^2))
  42.    shiny_red
  43.    bounds sombbound
  44.    }
  45.